package com.zhuge_new.untils;

import java.util.List;

/**
 * Created by Administrator on 2018/10/8.
 */

public class RemoveDuplicateUtil {

    //去除重复元素
    public static List removeDuplicate(List list) {

        for (int i = 0; i < list.size() - 1; i++) {
            for (int j = list.size() - 1; j > i; j--) {
                if (list.get(j).equals(list.get(i))) {
                    list.remove(j);
                }
            }
        }

        return list;
    }
}
